<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>单页面系统</title>
    <link rel="stylesheet" href="./plug/layui/css/layui.css">
    <script src="./plug/jquery-3.4.1.min.js"></script>
    <script src="./plug/layui/layui.js"></script>
    <script src="assembly/luban.js"></script>
    <script src="assembly/route.js"></script>
</head>
<body >
<!-- 你的HTML代码 -->
<div id="root"></div>
<input id="root_temp" type="hidden"/>

<script>
    // onhashchange="setOnPage()"
    //定义顶级的路由，这里去定义顶级的路由
    route.load("#root",{
        //定义根路径
        rootPath: "./components",
        //定义路由列表
        routeList: [
            {page: "index", component: "index.html", default: true}
        ]
    })


</script>
</body>
</html>